<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

   var arr =[12,34,80,15,8,90]
   var min =max= arr[0]
   for(var i=1;i<arr.length;i++)
   {
      if(arr[i]<min)
      {
        min = arr[i]
      }
    if(arr[i]>max)
      {
        max = arr[i]
      }
   }
   console.log("最小值" +min);
   console.log("最小值" +max);

   

    </script>
</body>
</html>